@extends('layouts.default') @section('main')
<link rel="stylesheet" href="/css/uniform.css" />
<link rel="stylesheet" href="/css/select2.css" />
<div id="content">
	<div id="content-header">
		<div id="breadcrumb">
			<a href="{{url('home')}}" title="返回首页" class="tip-bottom"><i
				class="icon-home"></i> 首页</a> <a href="#" class="current">角色管理</a>
		</div>
	</div>
	<div class="container-fluid">
		<div class="row-fluid">
			<form action="{{url('role/nav')}}" method="post">
			<div class="span12">
				<div class="widget-box">
					<div class="widget-title">
						<span class="icon"><i class="icon-th"></i></span>
						<h5>导航分配</h5>
					</div>
					<div class="widget-content">
						<table class="table table-bordered table-striped with-check">
							<thead>
								<tr>
									<th><input type="checkbox" id="title-table-checkbox"
										name="title-table-checkbox" /></th>
									<th>导航名称</th>
								</tr>
							</thead>
							<tbody>
								@foreach($submodules as $key => $submodule)
								<tr>
									<td><input type="checkbox" name="sid[]" value="{{$submodule['id']}}" {{$submodule['got']}} /></td>
									<td>{{$submodule['name']}}</td>
								</tr>
								@if(!empty($submodule['children']))
								@foreach($submodule['children'] as $k => $s)
								<tr>
									<td><input type="checkbox" name="sid[]" value="{{$s['id']}}" {{$s['got']}} /></td>
									<td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;--{{$s['name']}}</td>
								</tr>
								@endforeach
								@endif
								@endforeach
							</tbody>
						</table>
					</div>
				</div>
				<input type="hidden" name="_token" value="{{ csrf_token() }}">
				<input type="hidden" name="role_id" value="{{$role_id}}">
				<button class="btn" type="submit">提交</button>
			</div>
			</form>
		</div>
	</div>
</div>
<script src="/js/jquery.min.js"></script>
<script src="/js/matrix.tables.js"></script>
@stop
